blob: 77a994079ca5e0877333cfc387fc8cd5aa1cd5eb [file] [log] [blame]
Philip Jägenstedtc053f402014-01-22 17:02:181<!DOCTYPE html>
2<html>
3<head>
4 <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#handler-xhr-onload" data-tested-assertations="../.." />
5 <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#event-xhr-load" data-tested-assertations="../.." />
6 <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#infrastructure-for-the-send()-method" data-tested-assertations="following::dt[11] following::a[contains(@href,'#switch-done')]/.." />
7 <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#switch-done" data-tested-assertations="following::ol/li[1] following::ol/li[6]" />
8 <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-response-attribute" data-tested-assertations="/following::ol/li[3]" />
9 <script src="/resources/testharness.js"></script>
James Grahama3d9d8e2014-06-09 13:06:4810 <script src="/resources/testharnessreport.js"></script>
Philip Jägenstedtc053f402014-01-22 17:02:1811 <title>XMLHttpRequest: The send() method: Fire an event named load (no response entity body and the synchronous flag is set)</title>
12</head>
13
14<body>
15 <div id="log"></div>
16
17 <script type="text/javascript">
18 test(function()
19 {
20 var xhr = new XMLHttpRequest();
21 var pass = false;
22
23 xhr.onload = function(e)
24 {
25 assert_true(e instanceof ProgressEvent);
26 assert_equals(e.type, "load");
27 pass = true;
28 };
29
30 xhr.open("POST", "./resources/content.py", false);
31 xhr.send();
32
33 assert_equals(xhr.response, "");
34 assert_true(pass);
35 });
36 </script>
37</body>
38</html>